<?php /* Smarty version Smarty-3.1.18, created on 2017-05-24 15:11:31
         compiled from "/data/www/mystery/protected/modules/webadmin/views/netquestion/edit.tpl" */ ?>
<?php /*%%SmartyHeaderCode:752945227552e6c81ca6734-29789214%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'aba7fca35b82ae1ee7bc6f2ce3ba33242ba40fad' => 
    array (
      0 => '/data/www/mystery/protected/modules/webadmin/views/netquestion/edit.tpl',
      1 => 1494904921,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '752945227552e6c81ca6734-29789214',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_552e6c81de5b11_57199696',
  'variables' => 
  array (
    'question_info' => 0,
    'netquestion_info' => 0,
    'network_info' => 0,
    'up_network_info' => 0,
    'basic_list' => 0,
    'val' => 0,
    'answer_list' => 0,
    'classify_list' => 0,
    'parent_val' => 0,
    'second_val' => 0,
    'classify_val' => 0,
    'subject_list' => 0,
    'subject_val' => 0,
    'option_list' => 0,
    'option_key' => 0,
    'option_val' => 0,
    'attach_list' => 0,
    'nq_id' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_552e6c81de5b11_57199696')) {function content_552e6c81de5b11_57199696($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('../common/view_header.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<div class="main_view">
	<div class="biaoge">   
	<h2 class="wjtit"><?php echo $_smarty_tpl->tpl_vars['question_info']->value['question_name'];?>
</h2>
	<p class="wjbh" style='text-align:left;'><label>问卷编号：</label><?php echo $_smarty_tpl->tpl_vars['question_info']->value['identifier'];?>
</p>
	<table width="100%" border="0" cellspacing="0">
	  <tr>
		<td>网点名称：</td>
		<td><span class="wjbh"><?php echo $_smarty_tpl->tpl_vars['netquestion_info']->value['network_name'];?>
</span></td>
		<td>网点编号：<br /></td>
		<td><span class="wjbh"><?php echo $_smarty_tpl->tpl_vars['network_info']->value['network_num'];?>
</span></td>
		<?php if ($_smarty_tpl->tpl_vars['up_network_info']->value) {?>
                <td>所属分行：</td>
		<td><span class="wjbh"><?php echo $_smarty_tpl->tpl_vars['up_network_info']->value['network_name'];?>
</span></td>
		<td>分行编号：</td>
		<td><span class="wjbh"><?php echo $_smarty_tpl->tpl_vars['up_network_info']->value['network_num'];?>
</span></td>
                <?php }?>
	  </tr>
	 <?php if ($_smarty_tpl->tpl_vars['basic_list']->value) {?>
          <?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['val']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['basic_list']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['val']->key => $_smarty_tpl->tpl_vars['val']->value) {
$_smarty_tpl->tpl_vars['val']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['val']->key;
?>
	  <tr>
		<td colspan="2"><?php echo $_smarty_tpl->tpl_vars['val']->value['title'];?>
:</td>
		<td colspan="5"><span class="wjbh"><?php echo $_smarty_tpl->tpl_vars['answer_list']->value[$_smarty_tpl->tpl_vars['val']->value['subject_id']]['answer_desc'];?>
</span></td>
                <td><a href="javascript:;" onclick="basic(<?php echo $_smarty_tpl->tpl_vars['netquestion_info']->value['nq_id'];?>
,<?php echo $_smarty_tpl->tpl_vars['val']->value['subject_id'];?>
);">修改</a> </td>
	  </tr>
          <?php } ?>
          <?php }?>
	</table>
        
        <?php  $_smarty_tpl->tpl_vars['parent_val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['parent_val']->_loop = false;
 $_smarty_tpl->tpl_vars['parent_key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['classify_list']->value['list'][1]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['parent_val']->key => $_smarty_tpl->tpl_vars['parent_val']->value) {
$_smarty_tpl->tpl_vars['parent_val']->_loop = true;
 $_smarty_tpl->tpl_vars['parent_key']->value = $_smarty_tpl->tpl_vars['parent_val']->key;
?>
           <!--一级--> 
        <?php if ($_smarty_tpl->tpl_vars['parent_val']->value) {?>
        <p class="wjbh pt10"><label><strong><?php echo $_smarty_tpl->tpl_vars['classify_list']->value['all'][$_smarty_tpl->tpl_vars['parent_val']->value];?>
</strong></label></p>
        <?php }?>
        
        <!--是否有二级-->
        <?php  $_smarty_tpl->tpl_vars['second_val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['second_val']->_loop = false;
 $_smarty_tpl->tpl_vars['second_key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['classify_list']->value['list'][2]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['second_val']->key => $_smarty_tpl->tpl_vars['second_val']->value) {
$_smarty_tpl->tpl_vars['second_val']->_loop = true;
 $_smarty_tpl->tpl_vars['second_key']->value = $_smarty_tpl->tpl_vars['second_val']->key;
?>
            <?php if (isset($_smarty_tpl->tpl_vars['classify_list']->value['parent'][$_smarty_tpl->tpl_vars['parent_val']->value])&&(in_array($_smarty_tpl->tpl_vars['second_val']->value,$_smarty_tpl->tpl_vars['classify_list']->value['parent'][$_smarty_tpl->tpl_vars['parent_val']->value]))) {?>
            <p class="wjbh pt10"><label><strong><?php echo $_smarty_tpl->tpl_vars['classify_list']->value['all'][$_smarty_tpl->tpl_vars['second_val']->value];?>
</strong></label></p>
            <?php }?>
            <?php  $_smarty_tpl->tpl_vars['classify_val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['classify_val']->_loop = false;
 $_smarty_tpl->tpl_vars['classify_key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['classify_list']->value['list'][3]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['classify_val']->key => $_smarty_tpl->tpl_vars['classify_val']->value) {
$_smarty_tpl->tpl_vars['classify_val']->_loop = true;
 $_smarty_tpl->tpl_vars['classify_key']->value = $_smarty_tpl->tpl_vars['classify_val']->key;
?>
            <?php if (isset($_smarty_tpl->tpl_vars['classify_list']->value['parent'][$_smarty_tpl->tpl_vars['second_val']->value])&&(in_array($_smarty_tpl->tpl_vars['classify_val']->value,$_smarty_tpl->tpl_vars['classify_list']->value['parent'][$_smarty_tpl->tpl_vars['second_val']->value]))) {?>
        <div class="group" id="<?php echo $_smarty_tpl->tpl_vars['classify_val']->value;?>
">
	<p class="wjbh pt10"><label><strong><?php echo $_smarty_tpl->tpl_vars['classify_list']->value['all'][$_smarty_tpl->tpl_vars['classify_val']->value];?>
</strong></label></p>
	<table width="100%" border="0" cellspacing="0">
	  <tr>
		<td width="50%"><strong>指标</strong></td>
		<td width="5%"><strong>标准分</strong></td>
                <td width="4%"><strong>得分</strong></td>
                <td width="5%"><strong>选项</strong></td>
                <td width="5%"><strong>选项值</strong></td>
		<td width="18%"><strong>情景描述</strong></td>
                <td width="4%"><strong>附件</strong></td>
                <td width="4%"><strong>操作</strong></td>
	  </tr>
        <?php if ($_smarty_tpl->tpl_vars['subject_list']->value[$_smarty_tpl->tpl_vars['classify_val']->value]) {?>
          <?php  $_smarty_tpl->tpl_vars['subject_val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['subject_val']->_loop = false;
 $_smarty_tpl->tpl_vars['subject_key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['subject_list']->value[$_smarty_tpl->tpl_vars['classify_val']->value]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['subject_val']->key => $_smarty_tpl->tpl_vars['subject_val']->value) {
$_smarty_tpl->tpl_vars['subject_val']->_loop = true;
 $_smarty_tpl->tpl_vars['subject_key']->value = $_smarty_tpl->tpl_vars['subject_val']->key;
?>
          <tr class="classify_<?php echo $_smarty_tpl->tpl_vars['classify_val']->value;?>
" data="<?php if (isset($_smarty_tpl->tpl_vars['answer_list']->value[$_smarty_tpl->tpl_vars['subject_val']->value['subject_id']])&&($_smarty_tpl->tpl_vars['subject_val']->value['standard_score']!=$_smarty_tpl->tpl_vars['answer_list']->value[$_smarty_tpl->tpl_vars['subject_val']->value['subject_id']]['answer_score'])) {?>show<?php } else { ?>hide<?php }?>">
		<td><p><?php echo $_smarty_tpl->tpl_vars['subject_val']->value['question_num'];?>
 <?php echo $_smarty_tpl->tpl_vars['subject_val']->value['title'];?>
</p><p><?php echo $_smarty_tpl->tpl_vars['subject_val']->value['content'];?>
</p></td>
		<td><?php echo $_smarty_tpl->tpl_vars['subject_val']->value['standard_score'];?>
</td>
                <td><span class="wjbh"><?php echo $_smarty_tpl->tpl_vars['answer_list']->value[$_smarty_tpl->tpl_vars['subject_val']->value['subject_id']]['answer_score'];?>
</span></td>
                <td>
                    <?php if (isset($_smarty_tpl->tpl_vars['option_list']->value[$_smarty_tpl->tpl_vars['subject_val']->value['subject_id']])) {?>
                    <?php  $_smarty_tpl->tpl_vars['option_val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['option_val']->_loop = false;
 $_smarty_tpl->tpl_vars['option_key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['option_list']->value[$_smarty_tpl->tpl_vars['subject_val']->value['subject_id']]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['option_val']->key => $_smarty_tpl->tpl_vars['option_val']->value) {
$_smarty_tpl->tpl_vars['option_val']->_loop = true;
 $_smarty_tpl->tpl_vars['option_key']->value = $_smarty_tpl->tpl_vars['option_val']->key;
?>
                        <?php echo $_smarty_tpl->tpl_vars['option_key']->value;?>
：<?php echo $_smarty_tpl->tpl_vars['option_val']->value;?>
<br/>
                    <?php } ?>
                    <?php }?>
                </td>
                <td><?php if (isset($_smarty_tpl->tpl_vars['answer_list']->value[$_smarty_tpl->tpl_vars['subject_val']->value['subject_id']])) {?><?php echo $_smarty_tpl->tpl_vars['answer_list']->value[$_smarty_tpl->tpl_vars['subject_val']->value['subject_id']]['answer_option'];?>
<?php }?></td>
		<td><?php if (isset($_smarty_tpl->tpl_vars['answer_list']->value[$_smarty_tpl->tpl_vars['subject_val']->value['subject_id']])) {?><?php echo $_smarty_tpl->tpl_vars['answer_list']->value[$_smarty_tpl->tpl_vars['subject_val']->value['subject_id']]['answer_desc'];?>
<?php }?></td>
                <td>
                    <?php if (isset($_smarty_tpl->tpl_vars['attach_list']->value[$_smarty_tpl->tpl_vars['subject_val']->value['subject_id']])) {?>
                    <a href="/webadmin/netQuestion/attach?nq_id=<?php echo $_smarty_tpl->tpl_vars['nq_id']->value;?>
&subject_id=<?php echo $_smarty_tpl->tpl_vars['subject_val']->value['subject_id'];?>
" target="_blank">附件</a>
                    <?php }?>
                </td>
                <td>
                    <a href="javascript:;" onclick="answer(<?php echo $_smarty_tpl->tpl_vars['netquestion_info']->value['nq_id'];?>
,<?php echo $_smarty_tpl->tpl_vars['subject_val']->value['subject_id'];?>
);">修改</a> 
                </td>
	  </tr>
          <?php } ?>
          <?php }?>
	</table> 
        </div>
        <?php }?>
        <?php } ?>
        <?php } ?>
        <?php } ?>
	</table>		
  </div>
</div>
<script>
 //回答每个问题
function answer(nq_id,subject_id){ 
    $.layer({
        type: 2,
        shadeClose: true,
        title:'修改网点对标信息',
        closeBtn: [0, true],
        shade:[0.5, '#000'],
        border: [10, 0.3, '#000'],
        offset: ['150px',''],
        area: ['540px', '400px'],
        iframe: {src: '/webadmin/netQuestion/answer?nq_id='+nq_id+'&subject_id='+subject_id}
    }); 
}
//修改基本信息
function basic(nq_id,subject_id){
    $.layer({
        type: 2,
        shadeClose: true,
        title:'修改网点对标基本信息',
        closeBtn: [0, true],
        shade:[0.5, '#000'],
        border: [10, 0.3, '#000'],
        offset: ['150px',''],
        area: ['340px', '300px'],
        iframe: {src: '/webadmin/netQuestion/basic?nq_id='+nq_id+'&subject_id='+subject_id}
    }); 
}
</script>
</script>
<?php echo $_smarty_tpl->getSubTemplate ("../common/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php }} ?>
